Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sort-css-media-queries

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sort-css-media-queries

The custom `sort` method (mobile-first / desktop-first) of CSS media queries for `postcss-sort-media-queries`, `css-mqpacker` or `pleeease` (which uses css-mqpacker) or, perhaps, something else ))

  • 1.5.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
178K
decreased by-51.4%
Maintainers
1
Weekly downloads
 
Created

What is sort-css-media-queries?

The sort-css-media-queries npm package is designed to help developers sort CSS media queries in a specific order. This can be particularly useful for ensuring that media queries are applied in the correct sequence, which can help avoid issues with CSS specificity and cascading.

What are sort-css-media-queries's main functionalities?

Sort Media Queries

This feature allows you to sort an array of CSS media queries in a specific order. The code sample demonstrates how to use the sort-css-media-queries package to sort an array of media queries.

const sortCSSmq = require('sort-css-media-queries');

const mediaQueries = [
  '@media (min-width: 768px)',
  '@media (max-width: 600px)',
  '@media (min-width: 1024px)',
];

const sortedMediaQueries = mediaQueries.sort(sortCSSmq);
console.log(sortedMediaQueries);

Other packages similar to sort-css-media-queries

Keywords

FAQs

Package last updated on 26 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc